/*  1:   */ package com.atomikos.icatch.admin.imp;
/*  2:   */ 
/*  3:   */ import com.atomikos.icatch.admin.AdminTransaction;
/*  4:   */ import java.util.Vector;
/*  5:   */ import javax.swing.table.AbstractTableModel;
/*  6:   */ 
/*  7:   */ class LocalLogAdministratorTableModel
/*  8:   */   extends AbstractTableModel
/*  9:   */ {
/* 10:   */   private Vector data_;
/* 11:   */   
/* 12:   */   LocalLogAdministratorTableModel(Vector data)
/* 13:   */   {
/* 14:40 */     this.data_ = data;
/* 15:   */   }
/* 16:   */   
/* 17:   */   public int getRowCount()
/* 18:   */   {
/* 19:45 */     return this.data_.size();
/* 20:   */   }
/* 21:   */   
/* 22:   */   public int getColumnCount()
/* 23:   */   {
/* 24:50 */     return 3;
/* 25:   */   }
/* 26:   */   
/* 27:   */   public Object getValueAt(int row, int column)
/* 28:   */   {
/* 29:55 */     AdminTransaction tx = (AdminTransaction)this.data_.elementAt(row);
/* 30:56 */     if (column == 0) {
/* 31:57 */       return tx.getTid();
/* 32:   */     }
/* 33:58 */     if (column == 1) {
/* 34:59 */       return AdminTool.convertState(tx.getState());
/* 35:   */     }
/* 36:61 */     if (AdminTool.hasDetails(tx.getState())) {
/* 37:62 */       return new String("Click row for details.");
/* 38:   */     }
/* 39:64 */     return new String("");
/* 40:   */   }
/* 41:   */   
/* 42:   */   public String getColumnName(int col)
/* 43:   */   {
/* 44:71 */     if (col == 0) {
/* 45:72 */       return "Root transaction ID";
/* 46:   */     }
/* 47:73 */     if (col == 1) {
/* 48:74 */       return "2PC state";
/* 49:   */     }
/* 50:75 */     if (col == 2) {
/* 51:76 */       return "Remarks";
/* 52:   */     }
/* 53:78 */     return "unknown";
/* 54:   */   }
/* 55:   */   
/* 56:   */   public boolean isCellEditable(int row, int col)
/* 57:   */   {
/* 58:83 */     return false;
/* 59:   */   }
/* 60:   */   
/* 61:   */   public void rowDeleted(int row)
/* 62:   */   {
/* 63:88 */     fireTableRowsDeleted(row, row);
/* 64:   */   }
/* 65:   */   
/* 66:   */   public void refresh()
/* 67:   */   {
/* 68:93 */     fireTableRowsUpdated(0, this.data_.size());
/* 69:   */   }
/* 70:   */ }


/* Location:           C:\myfile\mysoft\apache-maven-3.5.0-bin\apache-maven-3.5.0\myrep\com\atomikos\transactions\3.7.0\transactions-3.7.0.jar
 * Qualified Name:     com.atomikos.icatch.admin.imp.LocalLogAdministratorTableModel
 * JD-Core Version:    0.7.0.1
 */